package com.ycy;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

public class Product {

  @NotNull(message = "id 不能为空", groups = {Update.class, Delete.class})
  public Long id;

  @NotBlank(message = "不能为空", groups = {Update.class, Add.class})

  public String productName;

  @NotNull(message = "price 不能为null")
  public Float price;

  public Boolean isDelete;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getProductName() {
    return productName;
  }

  public void setProductName(String productName) {
    this.productName = productName;
  }

  public Boolean getDelete() {
    return isDelete;
  }

  public void setDelete(Boolean delete) {
    isDelete = delete;
  }

  public Float getPrice() {
    return price;
  }

  public void setPrice(Float price) {
    this.price = price;
  }
}
